//
//  HomeNineCollectionViewCell.m
//  CommunitySupermarketProiect
//
//  Created by 吕惠卿 on 2017/10/12.
//  Copyright © 2017年 吕惠卿. All rights reserved.
//

#import "HomeNineCollectionViewCell.h"

@implementation HomeNineCollectionViewCell
-(id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatUI];
    }
    return self;
}
-(void)creatUI{
    _moneyLab = [[UILabel alloc]init];
    _moneyLab.font = [UIFont systemFontOfSize:13.0];
    _moneyLab.textColor = [UIColor redColor];
    _moneyLab.textAlignment = NSTextAlignmentLeft;
    [self.contentView addSubview:_moneyLab];
    [_moneyLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left).with.offset(8);
        make.bottom.equalTo(self.mas_bottom).with.offset(-4);
        make.width.mas_equalTo(WIDTH/2);
        make.height.mas_equalTo(20);
    }];
    _numLab = [[UILabel alloc]init];
    _numLab.font = [UIFont systemFontOfSize:13.0];
    _numLab.textColor = [UIColor lightGrayColor];
    _numLab.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:_numLab];
    [_numLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.mas_right).with.offset(-8);
        make.bottom.equalTo(self.mas_bottom).with.offset(-4);
        make.width.mas_equalTo(WIDTH/2);
        make.height.mas_equalTo(20);
    }];
    
    _nameLab = [[UILabel alloc]init];
    _nameLab.font = [UIFont fontWithName:@"STHeitiSC-Light" size:13.0];
//    _nameLab.font = [UIFont systemFontOfSize:15.0];
    _nameLab.numberOfLines = 0;
    _nameLab.textAlignment = NSTextAlignmentLeft;
    [self.contentView addSubview:_nameLab];
    [_nameLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left).with.offset(8);
        make.right.equalTo(self.mas_right).with.offset(-8);
        make.bottom.equalTo(_numLab.mas_top).with.offset(0);
        make.height.mas_equalTo(40);
    }];
    
    _imageView = [[UIImageView alloc]init];
    _imageView.backgroundColor = LineColor;
    [self addSubview:_imageView];
    [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView.mas_top).with.offset(4);
        make.left.equalTo(self.contentView.mas_left).with.offset(3);
        make.right.equalTo(self.contentView.mas_right).with.offset(-3);
        make.bottom.equalTo(_nameLab.mas_top).with.offset(-3);
    }];

    
    
}
@end
